package cn.sciento.farm.devicemanager.gateway.model.downlink;

import cn.sciento.farm.devicemanager.common.constant.MqttConstant;
import lombok.Data;
import lombok.EqualsAndHashCode;

@Data
@EqualsAndHashCode(callSuper = false)
public abstract class BaseBlockControlData extends AbstractBlockData {

    String concentrator;

    String node;

    String circuit;

    // 控制的时间
    int duration;

    int en;

    int delay;

    @Override
    public String generateId() {
        return String.format(MqttConstant.SEND_BLOCK_ID, concentrator, node, circuit);
    }

    @Override
    public String generateStatus() {
        return String.valueOf(en);
    }
}
